package org.aplombh.java.utils;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.net.URL;

public class WebDownloader {
    public static void  downloader(String url,String name) {
        try {
            File file = new File(name);
            System.out.println(file.getAbsolutePath());
            FileUtils.copyURLToFile(new URL(url), file);
        } catch (IOException e) {
            System.out.println("IOException! -- by WebDownloader->downloader");
        }
    }
}
